<?php
    include_once 'session_start.php';
    function session_check($d,$k=null){
        if($k==null){
            if(isset($_SESSION[$d])){
                return $_SESSION[$d];
                unset($_SESSION[$d]);
            }
            return false;
        }else{
            if(isset($_SESSION[$d][$k])){
                return $_SESSION[$d][$k];
                unset($_SESSION[$d][$k]);
            }
        return false;
        }

    }
?>